#ifndef CL_DEVICEINFO_HPP
#define CL_DEVICEINFO_HPP

#include <string>
#include <cstddef>

namespace cl {

    class Device;

    /** @brief The OpenCL DeviceInfo class. */
    class DeviceInfo {

    public:

        /** @brief DeviceInfo constructor.
         * @param device of where the info will be retrieved. */
        explicit DeviceInfo(const Device &device);

        /** @brief getName
         * @return Device name string. */
        const char *getName(void) const;

        /** @brief getHardwareVersion returns the OpenCL version supported by the
         * device. This version string has the following format:
         * OpenCL<space><major_version.minor_version><space><platform-specific information>
         * @return OpenCL version string. */
        const char *getHardwareVersion(void) const;

        /** @brief getSoftwareVersion
         * @return OpenCL software driver version string in the form major_number.minor_number. */
        const char *getSoftwareVersion(void) const;

        /** @brief getOpenCLCVersion returns the highest OpenCL C version supported by the
         * compiler for this device. This version string has the following format:
         * OpenCL<space>C<space><major_version.minor_version><space><vendor-specific information>
         * @return OpenCL C version string. */
        const char *getOpenCLCVersion(void) const;

        /** @brief getComputeUnits returns the number of parallel compute cores on the OpenCL device.
         * The minimum value is 1.
         * @return Value string. */
        const char *getComputeUnits(void) const;

        /** @brief getCacheSize returns the size of global memory cache in bytes.
         * @return Size string. */
        const char *getCacheSize(void) const;

        /** @brief getBaseClockFrequency returns the configured clock frequency of the device in MHz.
         * @return Value string. */
        const char *getBaseClockFrequency(void) const;

        /** @brief getMemorySize returns the size of global device memory in bytes.
         * @return Size string. */
        const char *getMemorySize(void) const;

        /** @brief getExtensions returns a space-separated list of extension names (the
         * extension names themselves do not contain any spaces) supported by the device.
         * @return OpenCL extensions string. */
        const char *getExtensions(void) const;

        /** @brief getMaxWorkItemsPerWorkGroup returns the maximum number of
         * work-items that can be specified in each dimension of a work-group.
         * The minimum value is (1, 1, 1).
         * @return Tuple value string. */
        const char *getMaxWorkItemsPerWorkGroup(void) const;

        /** @brief getMaxWorkGroupSize returns the maximum number of work-items
         * in a N-dimensional work-group executing a kernel.
         * The minimum value is 1.
         * @return Size string */
        const char *getMaxWorkGroupSize(void) const;

    private:
        std::string name;
        std::string hardwareVersion;
        std::string softwareVersion;
        std::string openCLCVersion;
        std::string computeUnits;
        std::string cacheSize;
        std::string baseClockFrequency;
        std::string memorySize;
        std::string extensions;
        std::string maximumWorkItemsPerWorkGroup;
        std::string maximumWorkGroupSize;
    };
}

#endif // CL_DEVICEINFO_HPP
